Optimal. Leaf size=287 \[ \frac {(b e g-c (e f+d g)) \left (c \left (e^2 f^2+d^2 g^2\right )+e g (2 a e g-b (e f+d g))\right ) (d+e x)^{1+m}}{e^4 g^4 (1+m)}+\frac {\left (b^2 e^2 g^2+c^2 \left (e^2 f^2+2 d e f g+3 d^2 g^2\right )+2 c e g (a e g-b (e f+2 d g))\right ) (d+e x)^{2+m}}{e^4 g^3 (2+m)}-\frac {c (c e f+3 c d g-2 b e g) (d+e x)^{3+m}}{e^4 g^2 (3+m)}+\frac {c^2 (d+e x)^{4+m}}{e^4 g (4+m)}+\frac {\left (c f^2-b f g+a g^2\right )^2 (d+e x)^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac {g (d+e x)}{e f-d g}\right )}{g^4 (e f-d g) (1+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.55, antiderivative size = 287, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {965, 1634, 70}
\begin {gather*} \frac {(d+e x)^{m+2} \left (2 c e g (a e g-b (2 d g+e f))+b^2 e^2 g^2+c^2 \left (3 d^2 g^2+2 d e f g+e^2 f^2\right )\right )}{e^4 g^3 (m+2)}+\frac {(d+e x)^{m+1} (b e g-c (d g+e f)) \left (e g (2 a e g-b (d g+e f))+c \left (d^2 g^2+e^2 f^2\right )\right )}{e^4 g^4 (m+1)}+\frac {(d+e x)^{m+1} \left (a g^2-b f g+c f^2\right )^2 \, _2F_1\left (1,m+1;m+2;-\frac {g (d+e x)}{e f-d g}\right )}{g^4 (m+1) (e f-d g)}-\frac {c (d+e x)^{m+3} (-2 b e g+3 c d g+c e f)}{e^4 g^2 (m+3)}+\frac {c^2 (d+e x)^{m+4}}{e^4 g (m+4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 70
Rule 965
Rule 1634
Rubi steps
\begin {align*} \int \frac {(d+e x)^m \left (a+b x+c x^2\right )^2}{f+g x} \, dx &=\frac {c^2 (d+e x)^{4+m}}{e^4 g (4+m)}+\frac {\int \frac {(d+e x)^m \left (-e \left (c^2 d^3 f-a^2 e^3 g\right ) (4+m)+e \left (2 a b e^3 g-c^2 d^2 (3 e f+d g)\right ) (4+m) x+e^2 \left (b^2 e^2 g+2 a c e^2 g-3 c^2 d (e f+d g)\right ) (4+m) x^2-c e^3 (c e f+3 c d g-2 b e g) (4+m) x^3\right )}{f+g x} \, dx}{e^4 g (4+m)}\\ &=\frac {c^2 (d+e x)^{4+m}}{e^4 g (4+m)}+\frac {\int \left (\frac {e (b e g-c (e f+d g)) \left (c \left (e^2 f^2+d^2 g^2\right )+e g (2 a e g-b (e f+d g))\right ) (4+m) (d+e x)^m}{g^3}+\frac {e \left (b^2 e^2 g^2+c^2 \left (e^2 f^2+2 d e f g+3 d^2 g^2\right )+2 c e g (a e g-b (e f+2 d g))\right ) (4+m) (d+e x)^{1+m}}{g^2}-\frac {c e (c e f+3 c d g-2 b e g) (4+m) (d+e x)^{2+m}}{g}+\frac {e^4 \left (c f^2-b f g+a g^2\right )^2 (4+m) (d+e x)^m}{g^3 (f+g x)}\right ) \, dx}{e^4 g (4+m)}\\ &=\frac {(b e g-c (e f+d g)) \left (c \left (e^2 f^2+d^2 g^2\right )+e g (2 a e g-b (e f+d g))\right ) (d+e x)^{1+m}}{e^4 g^4 (1+m)}+\frac {\left (b^2 e^2 g^2+c^2 \left (e^2 f^2+2 d e f g+3 d^2 g^2\right )+2 c e g (a e g-b (e f+2 d g))\right ) (d+e x)^{2+m}}{e^4 g^3 (2+m)}-\frac {c (c e f+3 c d g-2 b e g) (d+e x)^{3+m}}{e^4 g^2 (3+m)}+\frac {c^2 (d+e x)^{4+m}}{e^4 g (4+m)}+\frac {\left (c f^2-b f g+a g^2\right )^2 \int \frac {(d+e x)^m}{f+g x} \, dx}{g^4}\\ &=\frac {(b e g-c (e f+d g)) \left (c \left (e^2 f^2+d^2 g^2\right )+e g (2 a e g-b (e f+d g))\right ) (d+e x)^{1+m}}{e^4 g^4 (1+m)}+\frac {\left (b^2 e^2 g^2+c^2 \left (e^2 f^2+2 d e f g+3 d^2 g^2\right )+2 c e g (a e g-b (e f+2 d g))\right ) (d+e x)^{2+m}}{e^4 g^3 (2+m)}-\frac {c (c e f+3 c d g-2 b e g) (d+e x)^{3+m}}{e^4 g^2 (3+m)}+\frac {c^2 (d+e x)^{4+m}}{e^4 g (4+m)}+\frac {\left (c f^2-b f g+a g^2\right )^2 (d+e x)^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac {g (d+e x)}{e f-d g}\right )}{g^4 (e f-d g) (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 0.58, size = 254, normalized size = 0.89 \begin {gather*} \frac {(d+e x)^m \left (30 a b g m x^2 \left (1+\frac {e x}{d}\right )^{-m} F_1\left (2;-m,1;3;-\frac {e x}{d},-\frac {g x}{f}\right )+10 \left (b^2+2 a c\right ) g m x^3 \left (1+\frac {e x}{d}\right )^{-m} F_1\left (3;-m,1;4;-\frac {e x}{d},-\frac {g x}{f}\right )+15 b c g m x^4 \left (1+\frac {e x}{d}\right )^{-m} F_1\left (4;-m,1;5;-\frac {e x}{d},-\frac {g x}{f}\right )+6 c^2 g m x^5 \left (1+\frac {e x}{d}\right )^{-m} F_1\left (5;-m,1;6;-\frac {e x}{d},-\frac {g x}{f}\right )+30 a^2 f \left (\frac {g (d+e x)}{e (f+g x)}\right )^{-m} \, _2F_1\left (-m,-m;1-m;\frac {e f-d g}{e f+e g x}\right )\right )}{30 f g m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.06, size = 0, normalized size = 0.00 \[\int \frac {\left (e x +d \right )^{m} \left (c \,x^{2}+b x +a \right )^{2}}{g x +f}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right )^{m} \left (a + b x + c x^{2}\right )^{2}}{f + g x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (d+e\,x\right )}^m\,{\left (c\,x^2+b\,x+a\right )}^2}{f+g\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________